package com.lancoo.ccas53.pojo.response.basicPlatform;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.lancoo.ccas53.entity.Student;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName BaseStudent
 * @Description 基础平台学生信息
 * @Author quin
 * @Date 2023/3/1 10:43
 */
@NoArgsConstructor
@Data
public class BaseStudent {
    @JsonProperty("StudentID")
    private String studentID;
    @JsonProperty("StudentName")
    private String studentName;
    @JsonProperty("Sex")
    private String sex;
    @JsonProperty("GradeID")
    private String gradeID;
    @JsonProperty("GradeName")
    private String gradeName;
    @JsonProperty("CollegeID")
    private String collegeID;
    @JsonProperty("CollegeName")
    private String collegeName;
    @JsonProperty("SpecialityID")
    private String specialityID;
    @JsonProperty("SpecialityName")
    private String specialityName;
    @JsonProperty("ClassID")
    private String classID;
    @JsonProperty("ClassName")
    private String className;
    @JsonProperty("AvatarPath")
    private String avatarPath;
    @JsonProperty("PhotoPath")
    private String photoPath;

    public Student toStudent(Integer taskId){
        return new Student()
                .setTaskId(taskId)
                .setBaseStudentId(getStudentID())
                .setStudentName(getStudentName())
                .setImageUrl(getAvatarPath())
                .setClassId(getClassID())
                .setClassName(getClassName())
                .setMajorId(getSpecialityID())
                .setMajorName(getSpecialityName())
                .setBaseCollegeId(getCollegeID())
                .setCollegeName(getCollegeName())
                .setSexCode(getSex())
                .setGradeId(getGradeID())
                .setGradeName(getGradeName())
                .setSelectionScope(1)
                .setCreditLimit(30.0)
                .setCourseLimit(10)
                .setPreCreditLimit(30.0)
                .setPreCourseLimit(10);
    }


}
